#define _CRT_SECURE_NO_WARNINGS 1

#include "SList.h"



void test1()
{
	SLNode* plist = NULL;
	SLPushBack(&plist, 1);
	SLPushBack(&plist, 2);
	SLPushBack(&plist, 3);
	SLPushBack(&plist, 4);
	SLPrint(plist);

	SLPushFront(&plist, 10);
	SLPushFront(&plist, 20);
	SLPushFront(&plist, 30);
	SLPushFront(&plist, 40);
	SLPrint(plist);

	SLDestroy(&plist);
}


void test2()
{
	SLNode* plist = NULL;
	SLPushBack(&plist, 1);
	SLPushBack(&plist, 2);
	SLPushBack(&plist, 3);
	SLPushBack(&plist, 4);
	SLPushBack(&plist, 5);
	SLPushBack(&plist, 6);
	SLPrint(plist);

	SLPopBack(&plist);
	SLPopBack(&plist);
	SLPrint(plist);

	SLPopFront(&plist);
	SLPopFront(&plist);
	SLPrint(plist);
}




void test3()
{
	
	SLNode* plist = NULL;
	SLPushBack(&plist, 1);
	SLPushBack(&plist, 2);
	SLPushBack(&plist, 3);
	SLPushBack(&plist, 4);
	SLPushBack(&plist, 5);
	SLPushBack(&plist, 6);
	SLPrint(plist);

	SLNode* pos = SLFind(&plist, 3);
	SLInsert(&plist, pos, 3000);
	SLPrint(plist);

	SLErase(&plist, pos);
	SLPrint(plist);

}



int main()
{
	//test1();
	//test2();
	test3();

	return 0;
}